
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html ng-app="kitkatApp">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<jsp:include page="../common/commonHead.jsp"/> 
	<link rel="stylesheet" href="lib/css/pageManage.css">
	<title>管理页面</title>
</head>
<body ng-controller="manage" ng-click="saveProject($event)" >
<header>
   <div class="content">
       <span>KITKAT</span>
       <div>
            <span>项目</span>
       </div>
   </div>
</header>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog" style="width:800px" >
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">选取模板</h4>
         </div>
         <div class="modal-body" style="overflow:hidden;"><!-- 模板 -->
             <div class="col-sm-6" style="padding:0px">
                 <div class="col-sm-3" style="border:1px solid black;position:relative;margin-right:15px;padding:0px;height:150px;">
                     <div style="position:absolute;bottom:0px;width:100%;text-align:center;height:30px;line-height:30px">空白</div>
                 </div>
             </div>
             <div class="col-sm-6" style="padding:10px">
                 
             </div>
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-primary" ng-click="chooseTemplate()">选取</button>
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
         </div>
      </div><!-- /.modal-content -->
   </div><!-- /.modal -->
</div>

<div id="content">
     <div class="project">
           <div class="add">
               <button data-toggle="modal" data-target="#myModal" class="btn btn-warning" ng-click="showTemplate()"><span class="glyphicon glyphicon-plus"></span>&nbsp新增</button>
           </div>
           
           <div id="{{project.id}}" class="item" ng-repeat="project in projects">
               <div class="content">
                    <div class="col-sm-3">
                        <!-- <img data-toggle="modal" data-target="#uploadPic" style="height:150px;width:150px" src="lib/images/bg3.jpg"> -->
                        <div qcode url="http://114.215.85.105:8080/kitkat/showPage.do?projectId={{project.id}}"></div>
                    </div>
                    <div class="col-sm-7 center">
                         <div name ng-click="changeProContent(project.id,$event)" contenteditable="true">{{project.name}}</div>
                         <div des ng-click="changeProContent(project.id,$event)" contenteditable="true">{{project.description}}</div>
                         <div class="time">
                                                                     发布时间：{{project.publishDate}}最后修改时间：{{project.lastModifyDate}}
                         </div>
                    </div>
                    <div class="col-sm-1">
                         <!-- <button class="btn btn-success">预览</button> -->
                         <button class="btn btn-danger operaBtn" style="margin-top:0px" ng-click="editProject(project.id)">编辑</button>
                         <button class="btn btn-warning operaBtn" ng-click="deleteProject(project.id)">删除</button>
                    </div>
               </div>
           </div>
     </div>
	<jsp:include page="../common/commonScript.jsp"/> 
</body>
</html>